3.36 \(\int \csc ^2(c+d x) (a+b \tan (c+d x))^3 \, dx\)

Optimal. Leaf size=64 \[ -\frac {a^3 \cot (c+d x)}{d}+\frac {3 a^2 b \log (\tan (c+d x))}{d}+\frac {3 a b^2 \tan (c+d x)}{d}+\frac {b^3 \tan ^2(c+d x)}{2 d} \]

[Out]

-a^3*cot(d*x+c)/d+3*a^2*b*ln(tan(d*x+c))/d+3*a*b^2*tan(d*x+c)/d+1/2*b^3*tan(d*x+c)^2/d

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 64, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3516, 43} \[ \frac {3 a^2 b \log (\tan (c+d x))}{d}-\frac {a^3 \cot (c+d x)}{d}+\frac {3 a b^2 \tan (c+d x)}{d}+\frac {b^3 \tan ^2(c+d x)}{2 d} \]

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]^2*(a + b*Tan[c + d*x])^3,x]

[Out]

-((a^3*Cot[c + d*x])/d) + (3*a^2*b*Log[Tan[c + d*x]])/d + (3*a*b^2*Tan[c + d*x])/d + (b^3*Tan[c + d*x]^2)/(2*d
)

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 3516

Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[b/f, Subst[Int
[(x^m*(a + x)^n)/(b^2 + x^2)^(m/2 + 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && IntegerQ[m/
2]

Rubi steps

\begin {align*} \int \csc ^2(c+d x) (a+b \tan (c+d x))^3 \, dx &=\frac {b \operatorname {Subst}\left (\int \frac {(a+x)^3}{x^2} \, dx,x,b \tan (c+d x)\right )}{d}\\ &=\frac {b \operatorname {Subst}\left (\int \left (3 a+\frac {a^3}{x^2}+\frac {3 a^2}{x}+x\right ) \, dx,x,b \tan (c+d x)\right )}{d}\\ &=-\frac {a^3 \cot (c+d x)}{d}+\frac {3 a^2 b \log (\tan (c+d x))}{d}+\frac {3 a b^2 \tan (c+d x)}{d}+\frac {b^3 \tan ^2(c+d x)}{2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 1.01, size = 126, normalized size = 1.97 \[ -\frac {\csc (c+d x) \sec ^2(c+d x) \left (\left (a^3+3 a b^2\right ) \cos (3 (c+d x))+3 a \left (a^2-b^2\right ) \cos (c+d x)-2 b \sin (c+d x) \left (3 a^2 \log (\sin (c+d x))-3 a^2 \log (\cos (c+d x))-3 a^2 \cos (2 (c+d x)) (\log (\cos (c+d x))-\log (\sin (c+d x)))+b^2\right )\right )}{4 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + d*x]^2*(a + b*Tan[c + d*x])^3,x]

[Out]

-1/4*(Csc[c + d*x]*Sec[c + d*x]^2*(3*a*(a^2 - b^2)*Cos[c + d*x] + (a^3 + 3*a*b^2)*Cos[3*(c + d*x)] - 2*b*(b^2
- 3*a^2*Log[Cos[c + d*x]] - 3*a^2*Cos[2*(c + d*x)]*(Log[Cos[c + d*x]] - Log[Sin[c + d*x]]) + 3*a^2*Log[Sin[c +
 d*x]])*Sin[c + d*x]))/d

________________________________________________________________________________________

fricas [B]  time = 0.48, size = 127, normalized size = 1.98 \[ -\frac {3 \, a^{2} b \cos \left (d x + c\right )^{2} \log \left (\cos \left (d x + c\right )^{2}\right ) \sin \left (d x + c\right ) - 3 \, a^{2} b \cos \left (d x + c\right )^{2} \log \left (-\frac {1}{4} \, \cos \left (d x + c\right )^{2} + \frac {1}{4}\right ) \sin \left (d x + c\right ) - 6 \, a b^{2} \cos \left (d x + c\right ) + 2 \, {\left (a^{3} + 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{3} - b^{3} \sin \left (d x + c\right )}{2 \, d \cos \left (d x + c\right )^{2} \sin \left (d x + c\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2*(a+b*tan(d*x+c))^3,x, algorithm="fricas")

[Out]

-1/2*(3*a^2*b*cos(d*x + c)^2*log(cos(d*x + c)^2)*sin(d*x + c) - 3*a^2*b*cos(d*x + c)^2*log(-1/4*cos(d*x + c)^2
 + 1/4)*sin(d*x + c) - 6*a*b^2*cos(d*x + c) + 2*(a^3 + 3*a*b^2)*cos(d*x + c)^3 - b^3*sin(d*x + c))/(d*cos(d*x
+ c)^2*sin(d*x + c))

________________________________________________________________________________________

giac [A]  time = 1.80, size = 70, normalized size = 1.09 \[ \frac {b^{3} \tan \left (d x + c\right )^{2} + 6 \, a^{2} b \log \left ({\left | \tan \left (d x + c\right ) \right |}\right ) + 6 \, a b^{2} \tan \left (d x + c\right ) - \frac {2 \, {\left (3 \, a^{2} b \tan \left (d x + c\right ) + a^{3}\right )}}{\tan \left (d x + c\right )}}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2*(a+b*tan(d*x+c))^3,x, algorithm="giac")

[Out]

1/2*(b^3*tan(d*x + c)^2 + 6*a^2*b*log(abs(tan(d*x + c))) + 6*a*b^2*tan(d*x + c) - 2*(3*a^2*b*tan(d*x + c) + a^
3)/tan(d*x + c))/d

________________________________________________________________________________________

maple [A]  time = 0.52, size = 63, normalized size = 0.98 \[ -\frac {a^{3} \cot \left (d x +c \right )}{d}+\frac {3 a^{2} b \ln \left (\tan \left (d x +c \right )\right )}{d}+\frac {3 a \,b^{2} \tan \left (d x +c \right )}{d}+\frac {b^{3}}{2 d \cos \left (d x +c \right )^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)^2*(a+b*tan(d*x+c))^3,x)

[Out]

-a^3*cot(d*x+c)/d+3*a^2*b*ln(tan(d*x+c))/d+3*a*b^2*tan(d*x+c)/d+1/2/d*b^3/cos(d*x+c)^2

________________________________________________________________________________________

maxima [A]  time = 0.32, size = 56, normalized size = 0.88 \[ \frac {b^{3} \tan \left (d x + c\right )^{2} + 6 \, a^{2} b \log \left (\tan \left (d x + c\right )\right ) + 6 \, a b^{2} \tan \left (d x + c\right ) - \frac {2 \, a^{3}}{\tan \left (d x + c\right )}}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2*(a+b*tan(d*x+c))^3,x, algorithm="maxima")

[Out]

1/2*(b^3*tan(d*x + c)^2 + 6*a^2*b*log(tan(d*x + c)) + 6*a*b^2*tan(d*x + c) - 2*a^3/tan(d*x + c))/d

________________________________________________________________________________________

mupad [B]  time = 3.66, size = 62, normalized size = 0.97 \[ \frac {b^3\,{\mathrm {tan}\left (c+d\,x\right )}^2}{2\,d}-\frac {a^3\,\mathrm {cot}\left (c+d\,x\right )}{d}+\frac {3\,a^2\,b\,\ln \left (\mathrm {tan}\left (c+d\,x\right )\right )}{d}+\frac {3\,a\,b^2\,\mathrm {tan}\left (c+d\,x\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*tan(c + d*x))^3/sin(c + d*x)^2,x)

[Out]

(b^3*tan(c + d*x)^2)/(2*d) - (a^3*cot(c + d*x))/d + (3*a^2*b*log(tan(c + d*x)))/d + (3*a*b^2*tan(c + d*x))/d

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \tan {\left (c + d x \right )}\right )^{3} \csc ^{2}{\left (c + d x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)**2*(a+b*tan(d*x+c))**3,x)

[Out]

Integral((a + b*tan(c + d*x))**3*csc(c + d*x)**2, x)

________________________________________________________________________________________